import pymysql
from twisted.enterprise import adbapi
from pymysql import cursors


# 所有省份的基类，目前主要是初始化数据库

# 本地mac机器的用户名和密码：
# ip: 127.0.0.1
# root
# jhj198606.

# 服务器账号
# ip: 39.104.127.247
# root
# Tjdev2018

class MySqlTool(object):

    def __init__(self):
        dbparams = {
            'host': '39.104.127.247',
            'port': 3306,
            'user': 'root',
            'password': 'Tjdev2018',
            'database': 'tyc_company',
            'charset': 'utf8',
            'cursorclass': cursors.DictCursor
        }
        self.conn = pymysql.connect(**dbparams)
        self.cursor = self.conn.cursor()


if __name__ == '__main__':
    mysql = MySqlTool()
    mysql.get_detail_url()
